#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @project: fastapi-common
# @Author : luzhiheng
# @Date : 2020/10/23


class Settings:
    API_V1_STR: str = "/api/v1"
    SECRET_KEY: str = 'e4bf96e98fa938441eb58152ed8dca9fc2d0b74c4c59e0f8cf1eb4a94799071a'
    PROJECT_NAME: str = 'fastapi_common'
    LANGUAGE_ENV: str = 'zh'

    DIALECT = 'mysql'
    DRIVER = 'pymysql'
    HOST: str = '127.0.0.1'
    PORT: int = 3306
    DATABASE: str = 'sino_test'
    USER: str = 'root'
    PASSWORD: str = 'root'
    SQLALCHEMY_DATABASE_URI = '{}+{}://{}:{}@{}:{}/{}?charset=utf8'.format(
    DIALECT, DRIVER, USER, PASSWORD, HOST, PORT, DATABASE)

    ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 8

    BACKEND_CORS_ORIGINS = [
        "http://localhost",
        "http://localhost:8080"
    ]


settings: Settings = Settings()

